package com.songVersion.model;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable
public class Cover
{
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;

	@Persistent
	private String songName;
	
	@Persistent 
	private ThumbnailCache thumb; 
	
	@Persistent 
	private Boolean isParody;
	
	@Persistent
	private int hits;

	public String getSongName()
	{
		return songName;
	}

	public void setSongName(String songName)
	{
		this.songName = songName;
		this.hits = 1;
	}

	public Cover(String songName, ThumbnailCache thumb)
	{
		super();
		this.songName = songName;
		this.thumb = thumb;
		this.isParody = false;
	}

	public Key getKey()
	{
		return key;
	}

	public void setKey(Key key)
	{
		this.key = key;
	}

	public int getHits()
	{
		return hits;
	}

	public void setHits(int hits)
	{
		this.hits = hits;
	}

	public ThumbnailCache getThumb() {
		return thumb;
	}

	public void setThumb(ThumbnailCache thumb) {
		this.thumb = thumb;
	}

	public Boolean getIsParody() {
		return isParody;
	}

	public void setIsParody(Boolean isParody) {
		this.isParody = isParody;
	}
	
}
